﻿using System;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x020001CB RID: 459
public class CutActionEdit_ColorFilter : CutActionEdit
{
	// Token: 0x06000BEC RID: 3052 RVA: 0x000459CC File Offset: 0x00043BCC
	public override void Setup(CutAction act)
	{
		this.colorFilter = (act as CutAct_ColorFilter);
		this.durationField.text = this.colorFilter.duration.ToString("000.00");
		this.colorR.value = this.colorFilter.color.r;
		this.colorG.value = this.colorFilter.color.g;
		this.colorB.value = this.colorFilter.color.b;
		this.colorA.value = this.colorFilter.color.a;
	}

	// Token: 0x06000BED RID: 3053 RVA: 0x00045A74 File Offset: 0x00043C74
	private void Update()
	{
		if (this.colorFilter != null)
		{
			this.colorImage.color = this.colorFilter.color;
		}
	}

	// Token: 0x06000BEE RID: 3054 RVA: 0x00045A98 File Offset: 0x00043C98
	public void SetSliderR(float r)
	{
		this.colorFilter.color.r = r;
	}

	// Token: 0x06000BEF RID: 3055 RVA: 0x00045AAC File Offset: 0x00043CAC
	public void SetSliderG(float g)
	{
		this.colorFilter.color.g = g;
	}

	// Token: 0x06000BF0 RID: 3056 RVA: 0x00045AC0 File Offset: 0x00043CC0
	public void SetSliderB(float b)
	{
		this.colorFilter.color.b = b;
	}

	// Token: 0x06000BF1 RID: 3057 RVA: 0x00045AD4 File Offset: 0x00043CD4
	public void SetSliderA(float a)
	{
		this.colorFilter.color.a = a;
	}

	// Token: 0x06000BF2 RID: 3058 RVA: 0x00045AE8 File Offset: 0x00043CE8
	public void SetDuration(string str)
	{
		try
		{
			float duration = float.Parse(str);
			this.colorFilter.duration = duration;
		}
		catch
		{
		}
	}

	// Token: 0x04000C1D RID: 3101
	private CutAct_ColorFilter colorFilter;

	// Token: 0x04000C1E RID: 3102
	[SerializeField]
	private Image colorImage;

	// Token: 0x04000C1F RID: 3103
	[SerializeField]
	private Slider colorR;

	// Token: 0x04000C20 RID: 3104
	[SerializeField]
	private Slider colorG;

	// Token: 0x04000C21 RID: 3105
	[SerializeField]
	private Slider colorB;

	// Token: 0x04000C22 RID: 3106
	[SerializeField]
	private Slider colorA;

	// Token: 0x04000C23 RID: 3107
	[SerializeField]
	private InputField durationField;
}
